using System.Collections.Generic;
using CSI.Directory.Core.Model;

namespace CSI.Directory.Core.Repositories
{
    public interface IDirectoryRepository
    {
        IList<Category> GetAllCategories();
        IList<Listing> GetListingsByCategory(int id);
        Category GetCategoryByName(string name);

        IList<Category> GetSubCategoriesForCategory(int i);
        TransactionResult AddListing(Listing list,IList<ListingCategory> categories);
        TransactionResult ManageListing(IList<Listing> listings);
        //IList<Listing> GetListingsForManager();
        Listing GetListingById(int id);
        IList<ListingCategory> GetCategoriesForListing(Listing l);
        Category GetCategoryById(int id);
        TransactionResult UpdateCategory(Category c);
        TransactionResult AddCategory(Category category);
        Category GetParentCategoryByName(string name);
        IList<Listing> SearchDirectory(string query, int category, int county);
        TransactionResult DeleteCategory(int id);
        TransactionResult FeatureListing(ListingCategory l);
        TransactionResult DeleteListingCategory(int id);
        IList<ListingCategory> GetListingCategoryBy(Category c);
        IList<ListingCategory> GetFeaturedListingCategories();
        TransactionResult RemoveFeature(ListingCategory category);
        ListingCategory GetListingCategoryBy(int id);
        IList<County> GetAllCounties();
        
        /*Article Base Methods Start Here */
        IList<Article> GetArticlesByMenuId(int id);
        Article GetArticleById(int id);
        TransactionResult AddArticle(Article article);
        TransactionResult UpdateArticle(Article article);
        TransactionResult DeleteArticle(int id);
        /*Article Base Methods Ends Here */

        /*Menu based Methods Start Here */
        Menu GetMenusById(int menuId);
        IList<Menu> GetAllMenus();
        TransactionResult AddMenu(Menu menu);
        TransactionResult UpdateMenu(Menu menu);
        TransactionResult DeleteMenu(int id);
        /*Menu based Methods Ends Here */
        IList<Listing> GetListingsByUserId(int id);
        IList<Listing> GetListingsByCounty(int id);
        County GetCountyById(int id);
        IList<Article> GetAllArticles();
        void DeleteCategoryAndCountyForListing(int id);
        IList<Menu> GetMenuByName(string name);
        IList<ListingCategory> GetListingCategoryByListingId(int id);
        IList<ListingCounty> GetListingCountiesByListingId(int id);
        Listing GetListingByUserId(int id);
        IList<Listing> GetFeaturedListings();
        County GetCountyByName(string name);
    }
}